#ifndef _XML_CONFIG_READER_HPP_
#define _XML_CONFIG_READER_HPP_

#include <fstream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <expat.h>
#include "cfgreader.hpp"
#include "throwerr.hpp"

using std::ifstream;

//	string get("presentation.title") <-- gives parameter
// texts are ignored

class xml_config_reader: public ConfigReader {
	friend void xstart_element(void* udata, const char *tag, const char **attr);
	friend void xend_element(void* udata, const char* tag);
	
	vector<string> tagfull;

public:	
	xml_config_reader(const char* cfgfile=NULL);
	void Read(const string cfg_fl);
	void ErrorHandler(void* errstuff);	
};


#endif
